const userInfo = {};
export const actions = {
  UPDATE_USER_INFO: "updateUserInfo",
};
export default {
  namespaced: true,
  state: () => ({
    userInfo: userInfo,
  }),
  getters: {
    isEc: (state) => state.userInfo.branch == "EC",
  },
  mutations: {},
  //调用mutations方法，可以使用异步方法
  actions: {
    // TODO fetchSiderMenu
    updateUserInfo: async ({ commit }, userInfo) => {
      commit("setUserInfo", userInfo);
    },
  },
};
